www.gusucode.com > VC++ 实现窗体置顶显示窗体最前源码-源码程序 > VC++ 实现窗体置顶显示窗体最前源码-源码程序/code/AlwaysOnTopDoc.cpp
// AlwaysOnTopDoc.cpp : implementation of the CAlwaysOnTopDoc class // Download by http://www.NewXing.com #include "stdafx.h" #include "AlwaysOnTop.h" #include "AlwaysOnTopDoc.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CAlwaysOnTopDoc IMPLEMENT_DYNCREATE(CAlwaysOnTopDoc, CDocument) BEGIN_MESSAGE_MAP(CAlwaysOnTopDoc, CDocument) //{{AFX_MSG_MAP(CAlwaysOnTopDoc) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CAlwaysOnTopDoc construction/destruction CAlwaysOnTopDoc::CAlwaysOnTopDoc() { // TODO: add one-time construction code here } CAlwaysOnTopDoc::~CAlwaysOnTopDoc() { } BOOL CAlwaysOnTopDoc::OnNewDocument() { if (!CDocument::OnNewDocument()) return FALSE; // TODO: add reinitialization code here // (SDI documents will reuse this document) return TRUE; } ///////////////////////////////////////////////////////////////////////////// // CAlwaysOnTopDoc serialization void CAlwaysOnTopDoc::Serialize(CArchive& ar) { if (ar.IsStoring()) { // TODO: add storing code here } else { // TODO: add loading code here } } ///////////////////////////////////////////////////////////////////////////// // CAlwaysOnTopDoc diagnostics #ifdef _DEBUG void CAlwaysOnTopDoc::AssertValid() const { CDocument::AssertValid(); } void CAlwaysOnTopDoc::Dump(CDumpContext& dc) const { CDocument::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CAlwaysOnTopDoc commands